home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
329_01
/
st_lexyy.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-11-27
|
32KB
|
1,080 lines
#define FLEX_COMPRESSED
/* A lexical scanner generated by flex */
/* scanner skeleton version:
* $Header: flex.skl,v 2.0.0.1 89/07/30 23:20:47 pcd Exp Locker: pcd $
*/
#include <stdio.h>
#define FLEX_SCANNER
/* define PROTOTYPES */
#if 0
#ifdef __STDC__
#ifndef MWC /* Mark Williams thinks it's __STDC__, how strange
--HdeF
*/
#define PROTOTYPES
#endif
#endif
#endif
/* amount of stuff to slurp up with each read */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of input buffer */
#endif
/* returned upon end-of-file */
#define YY_END_TOK 0
/* copy whatever the last rule matched to the standard output */
#define ECHO fputs( yytext, yyout )
/* gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#define YY_INPUT(buf,result,max_size) \
if ( (result = read( fileno(yyin), buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "read() in flex scanner failed" );
#define YY_NULL 0
#define yyterminate() return ( YY_NULL )
/* report a fatal error */
#define YY_FATAL_ERROR(msg) \
{ \
fputs( msg, stderr ); \
putc( '\n', stderr ); \
exit( 1 ); \
}
/* default yywrap function - always treat EOF as an EOF */
#define yywrap() 1
/* enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN
*/
#define BEGIN yy_start = 1 + 2 *
/* action number for EOF rule of a given start state */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* special action meaning "start processing a new file" */
#define YY_NEW_FILE goto new_file
/* default declaration of generated scanner - a define so the user can
* easily add parameters
*/
#ifdef PROTOTYPES
#define YY_DECL int yylex(/* void */ )/*Mark Williams thinks it's standard!! */
#else
#define YY_DECL int yylex()
#endif
/* code executed at the end of each rule */
#define YY_BREAK break;
#define YY_END_OF_BUFFER_CHAR 0
/* done after the current pattern has been matched and before the
* corresponding action - sets up yytext
*/
#define YY_DO_BEFORE_ACTION \
yytext = yy_bp; \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
/* returns the length of the matched text */
#define yyleng (yy_cp - yy_bp)
#define EOB_ACT_RESTART_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* return all but the first 'n' matched characters back to the input stream */
#define yyless(n) \
{ \
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
yy_c_buf_p = yy_cp = yy_bp + n; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
}
#define unput(c) yyunput( c, yy_bp )
#define YY_USER_ACTION
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
char *yytext;
#ifndef PROTOTYPES
#define const
#endif
#define INITIAL 0
/* csubst.l */
/* lex source of csubst utility.
This programme is shareware.
If you found this programme useful then send me a colourful postcard
with the words "Happy Birthday" (or equivalent) so that it arrives
at my address around the first of January 1991.
Henri de Feraudy
27 rue Chef de Ville
92140 Clamart
France
*/
extern int Mode, Truncation;
extern char *lookup_subst();
#include <stdio.h>
#include "csubst.h"
#define cond_putchar(C) if(Mode == APPLY_SUBSTS || Mode == PRINT_TRUNCATED)putchar(C);
#ifdef yywrap
#undef yywrap
#define yywrap() (!next_yyin())
#endif
void action_keyword(), default_action(), action_symbol(), read_comment();
#define CPP_MACRO 1
#define YY_END_OF_BUFFER 46
typedef int yy_state_type;
static const short int yy_accept[337] =
{ 0,
0, 0, 0, 0, 46, 44, 42, 44, 44, 44,
44, 44, 41, 41, 41, 41, 41, 41, 41, 41,
41, 41, 41, 41, 41, 41, 41, 41, 40, 40,
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
40, 40, 40, 40, 0, 38, 0, 0, 5, 5,
5, 0, 0, 1, 0, 41, 41, 41, 41, 41,
41, 41, 13, 41, 41, 41, 41, 41, 41, 21,
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
41, 40, 40, 40, 40, 40, 40, 40, 13, 40,
40, 40, 40, 40, 40, 21, 40, 40, 40, 40,
40, 40, 40, 40, 40, 40, 40, 5, 5, 5,
5, 39, 43, 41, 41, 41, 41, 41, 41, 41,
41, 41, 41, 41, 19, 41, 22, 41, 41, 41,
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
41, 41, 40, 40, 40, 40, 40, 40, 40, 40,
40, 40, 40, 19, 40, 22, 40, 40, 40, 40,
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
40, 5, 5, 5, 5, 6, 41, 8, 9, 41,
41, 41, 41, 15, 16, 41, 41, 20, 23, 41,
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
35, 41, 41, 6, 40, 8, 9, 40, 40, 40,
40, 15, 16, 40, 40, 20, 23, 40, 40, 40,
40, 40, 40, 40, 40, 40, 40, 40, 35, 40,
40, 5, 5, 5, 5, 7, 10, 41, 41, 41,
41, 18, 41, 41, 26, 41, 41, 41, 41, 41,
41, 33, 41, 41, 37, 7, 10, 40, 40, 40,
40, 18, 40, 40, 26, 40, 40, 40, 40, 40,
40, 33, 40, 40, 37, 5, 3, 5, 5, 41,
41, 14, 17, 41, 25, 27, 28, 29, 30, 31,
41, 41, 41, 40, 40, 14, 17, 40, 25, 27,
28, 29, 30, 31, 40, 40, 40, 4, 5, 41,
12, 41, 32, 41, 41, 40, 12, 40, 32, 40,
40, 4, 5, 11, 24, 34, 36, 11, 24, 34,
36, 0, 0, 0, 2, 0
} ;
static const char yy_ec[128] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 4, 5, 1, 1, 1, 6, 1,
1, 7, 1, 1, 1, 8, 9, 10, 11, 11,
11, 11, 11, 11, 11, 11, 11, 1, 1, 12,
1, 13, 1, 1, 14, 14, 14, 14, 14, 14,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1, 16, 1, 1, 17, 1, 18, 19, 20, 21,
22, 23, 24, 25, 26, 15, 27, 28, 29, 30,
31, 32, 15, 33, 34, 35, 36, 37, 38, 39,
40, 41, 1, 1, 1, 1, 1
} ;
static const char yy_meta[42] =
{ 0,
1, 2, 1, 1, 1, 3, 1, 4, 4, 5,
5, 1, 1, 6, 7, 4, 8, 6, 6, 6,
6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7
} ;
static const short int yy_base[345] =
{ 0,
0, 0, 41, 0, 415, 416, 416, 79, 82, 398,
406, 373, 0, 375, 377, 67, 65, 58, 62, 378,
71, 377, 385, 74, 366, 375, 373, 378, 0, 366,
368, 86, 83, 85, 79, 369, 93, 368, 376, 93,
357, 366, 364, 369, 116, 416, 390, 100, 0, 370,
99, 119, 124, 416, 0, 0, 356, 368, 355, 370,
357, 363, 349, 350, 347, 347, 350, 347, 344, 0,
343, 347, 109, 345, 65, 116, 349, 342, 111, 110,
347, 0, 337, 349, 336, 351, 338, 344, 330, 331,
328, 328, 331, 328, 325, 0, 324, 328, 115, 326,
116, 123, 330, 323, 117, 120, 328, 0, 330, 131,
332, 416, 416, 320, 332, 327, 315, 119, 329, 327,
323, 315, 321, 324, 0, 310, 0, 316, 313, 302,
304,